//
//  SelfInforListTableViewCell.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/12.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "SelfInforListTableViewCell.h"

@implementation SelfInforListTableViewCell
{
    GLGWLabel * leftLabel;
    GLGWLabel * rightLabel;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        leftLabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#999999"] inSuperView:self.contentView];
        [leftLabel mas_updateConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.contentView.mas_left).offset(kWidthProportion_In_iPhoneTriploid(15));
            make.top.equalTo(self.contentView.mas_top).offset(kHeightProportion_In_iPhoneTriploid(12));
            make.bottom.equalTo(self.contentView.mas_bottom).offset(-kHeightProportion_In_iPhoneTriploid(12));
        }];
        leftLabel.numberOfLines = 0;
        leftLabel.text = @"电话";
        
        rightLabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#666666"] inSuperView:self];
        [rightLabel mas_updateConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.contentView.mas_left).offset(kWidthProportion_In_iPhoneTriploid(102));
            make.centerY.equalTo(self->leftLabel.mas_centerY);
        }];
        rightLabel.text = @"18911263314";
    }
    return self;
}

- (void)refreshCellWithModel:(StoreIntroduceModel *)model index:(NSIndexPath *)index
{
    StoreIntroduceDataModel *dataModel = model.data;
    switch (index.row) {
        case 0:
            rightLabel.text = dataModel.contacts;
            break;
        case 1:
            rightLabel.text = dataModel.contactPhone;
            break;
        case 2:
            rightLabel.text = dataModel.contactTel;
            break;
        case 3:
            rightLabel.text = dataModel.fax;
            break;
        case 4:
            rightLabel.text = dataModel.contactQq;
            break;
        default:
            break;
    }
}

- (void)setLeftStr:(NSString *)leftStr
{
    _leftStr = leftStr;
    leftLabel.text = leftStr;
}


@end
